package com.vondear.rxui.view.dialog;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.vondear.rxui.R;


/**
 * @author vondear
 * @date 2016/7/19
 * 确认 取消 Dialog
 */
public class RxDialogZfb extends RxDialog {
    private TextView sureBtn;
    private TextView cancelBtn;
    private EditText accountEdit;
    private EditText nameEdit;

    public RxDialogZfb(Context context, int themeResId) {
        super(context, themeResId);
        initView();
    }

    public RxDialogZfb(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
        initView();
    }

    public RxDialogZfb(Context context) {
        super(context);
        initView();
    }

    public RxDialogZfb(Activity context) {
        super(context);
        initView();
    }

    public RxDialogZfb(Context context, float alpha, int gravity) {
        super(context, alpha, gravity);
        initView();
    }

    public void setSureListener(View.OnClickListener sureListener) {
        sureBtn.setOnClickListener(sureListener);
    }

    public void setCancelListener(View.OnClickListener cancelListener) {
        cancelBtn.setOnClickListener(cancelListener);
    }

    public TextView getNameEdit(){
        return nameEdit;
    }
    public TextView getAccountEdit(){
        return accountEdit;
    }

    private void initView() {
        View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_zfb_info, null);
        sureBtn = dialogView.findViewById(R.id.sureBtn);
        cancelBtn = dialogView.findViewById(R.id.cancelBtn);
        sureBtn = dialogView.findViewById(R.id.sureBtn);
        nameEdit = dialogView.findViewById(R.id.nameEdit);
        accountEdit = dialogView.findViewById(R.id.accountEdit);
        setContentView(dialogView);
    }
}
